class StringBuilderTest {
	public static void main(String[] args) {
		StringBuilder sb=new StringBuilder("Hello Java");
		sb.append(" And JavaScript");
		sb.replace(6,10,"HTML, CSS");

		sb.append(".").append(".").append(".");

		System.out.println("capacity: " + sb.capacity() + "; length: " + sb.length());
		System.out.println(sb);
		sb.setLength(30);
		System.out.println(sb);
		System.out.println("capacity: " + sb.capacity() + "; length: " + sb.length());
		sb.trimToSize();
		System.out.println("capacity: " + sb.capacity() + "; length: " + sb.length());
	}
}
